
 Our program uses lasers sensors for two reasons. The first one is obstacles avoidance and the second one is map making.
 
 \subsubsection{Obstacle avoidance}
 	To avoid obstacles, a part of laser echoes are parsed as shown in the following figure.
 	\begin{figure}[H]
 		\center
 		\includegraphics[scale=0.6]{img/avoid.png}
 		\caption{Region of interest to avoid obstacles.
 		The red arc is the laser range, the orange part represents the analyzed echoes.}
 	\end{figure}
 	
	When the robot encounters an obstacle, it means when an echoes is inferior to a specified distance, it stops. Then it improves its map representation by scanning the environment and a new path planning is executed.
	
 \subsubsection{Map making}
 
 	To create a map of its environment the robot uses its lasers sensors. Every four seconds, the robot scans the surrounding environment. In order to understand how the map is made, it is necessary to introduce the notion of quad-tree. The method to update the internal representation will be explained later in this report.
 	
 	\subsubsection*{Quad trees}
 	
	 In our implementation, the environment can be considered as a two dimensional space. The map is firstly divided into cells which have the same dimension. If a cell appears to be occupied it will be divided into four children (that is the quad tree representation). This operation is executed recursively until a desired precision is reached. On the other hand, if a cell is considered as free, nothing happens. An example of quad tree representation is provided below.
	 
	 \begin{figure}[H]
	 	\centering
	 	\includegraphics[scale=0.8]{img/qtree.png}
	 	\caption{Quad tree representation. Occupied cells are black, free are gray.}
	 \end{figure}
	 
	 \subsubsection*{Updating the internal representation}
	 
	 
	 	In the internal representation, a weight is associated to each cell. At the beginning all the cells have a weight equals to zero. As mentioned earlier in this report, the robot scans the environment every four seconds. This laser scan is analysed to update the internal representation, it means, updating weight of the cells. The weight of a cell is increased of three if the lasers encounters an obstacle on the cell, otherwise it is decreased of one. The following schema is an example on one laser direction of how the weight will be updated. The yellow part is the field of vision of the robot, the gray part corresponds to an obstacle, and the orange one is the part which will be ignored because the laser already encountered an obstacle.
		
		\begin{figure}[H]
			\centering
			\includegraphics[scale=0.7]{img/HIMM.png}
			\caption{HIMM}
		\end{figure}